# Downloads and installs the latest SFML snapshot
cmake_minimum_required(VERSION 2.6)

# Add dependency for ExternalProject
include(ExternalProject)

# Download and compile SFML using an external project
ExternalProject_Add( sfml
    CMAKE_ARGS 
        -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
    URL 
        https://github.com/LaurentGomila/SFML/tarball/master?sfml.tgz
    PATCH_COMMAND 
        patch -p1 -t -N < ${CMAKE_CURRENT_SOURCE_DIR}/sfml.patch
)
